# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=domainhunter
pkgver=51.38cb7ef
pkgrel=6
pkgdesc='Checks expired domains for categorization/reputation and Archive.org history to determine good candidates for phishing and C2 domain names.'
groups=('blackarch' 'blackarch-recon' 'blackarch-social')
arch=('any')
url='https://github.com/threatexpress/domainhunter'
license=('BSD')
depends=('python' 'python-requests' 'python-beautifulsoup4' 'python-lxml'
         'python-pillow' 'python-pytesseract' 'python-urllib3'
         'python-texttable')
makedepends=('git')
source=("git+https://github.com/threatexpress/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

